var __extends =
    (this && this.__extends) ||
    (function () {
      var t = function (e, o) {
        return (t =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (t, e) {
              t.__proto__ = e;
            }) ||
          function (t, e) {
            for (var o in e)
              Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
          })(e, o);
      };
      return function (e, o) {
        function i() {
          this.constructor = e;
        }
        if ("function" != typeof o && null !== o)
          throw new TypeError(
            "Class extends value " + String(o) + " is not a constructor or null"
          );
        t(e, o),
          (e.prototype =
            null === o
              ? Object.create(o)
              : ((i.prototype = o.prototype), new i()));
      };
    })(),
  NoticeBoardDetailView = (function (t) {
    function e(e) {
      var o = t.call(this) || this;
      return (
        (o.prevX = 0),
        (o.prevY = 0),
        o.btn_notice_cancle.on(Laya.Event.CLICK, o, o.onClickNoticeClose),
        (o.noticObj = e),
        (o.label_notice_detail_title.text = e.title),
        (o.label_notice_time.text = e.createTime),
        (o.txt = new Laya.Text()),
        (o.txt.overflow = Laya.Text.SCROLL),
        (o.txt.text = e.content),
        o.txt.size(310, 410),
        (o.txt.borderColor = "#FFFFFF"),
        (o.txt.x = 33),
        (o.txt.y = 115),
        (o.txt.fontSize = 18),
        (o.txt.color = "#ffffff"),
        (o.txt.wordWrap = !0),
        o.addChild(o.txt),
        o.txt.on(Laya.Event.MOUSE_DOWN, o, o.startScrollText),
        o
      );
    }
    return (
      __extends(e, t),
      (e.prototype.startScrollText = function (t) {
        "item_notice" != t.target.name &&
          ((this.prevX = this.txt.mouseX),
          (this.prevY = this.txt.mouseY),
          Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.scrollText),
          Laya.stage.on(Laya.Event.MOUSE_UP, this, this.finishScrollText));
      }),
      (e.prototype.finishScrollText = function () {
        Laya.stage.off(Laya.Event.MOUSE_MOVE, this, this.scrollText),
          Laya.stage.off(Laya.Event.MOUSE_UP, this, this.finishScrollText);
      }),
      (e.prototype.scrollText = function () {
        var t = this.txt.mouseX,
          e = this.txt.mouseY;
        (this.txt.scrollX += this.prevX - t),
          (this.txt.scrollY += this.prevY - e),
          (this.prevX = t),
          (this.prevY = e);
      }),
      (e.prototype.onClickNoticeClose = function () {
        this.removeSelf();
      }),
      e
    );
  })(ui.NoticeBoardController.NoticeBoardDetailViewUI);
